Global Attributes in HTML
Global HTML attributes are attributes that can be applied to almost any HTML element, regardless of the element type. They provide common functionality, such as styling, accessibility, and identification.
id: Assigns a unique identifier to an element.
class: Assigns one or more class names for styling or scripting purposes.
style: Applies inline CSS styles directly to an element.
title: Provides additional information about an element, often shown as a tooltip.
lang: Specifies the language of the element's content.
dir: Specifies the text direction (ltr or rtl).
hidden: Hides the element from the page.
tabindex: Controls the element's focus order when tabbing.
In short: Global attributes provide consistent functionality across HTML elements, making it easier to style, identify, or enhance elements for accessibility and scripting.